package com.example.user.feign;

import com.usian.model.article.dtos.ApAuthorDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "leadnews-article")
public interface ArticleFeign {
    @PostMapping("/service_9004/api/v1/author/add_author")
    ResponseResult addAuthor(@RequestBody ApAuthorDto apAuthorDto);

    @GetMapping("/service_9004/api/v1/author/get_author_by_name")
    ResponseResult getAuthorByName(@RequestParam String name);
}
